﻿using AutoMapper;
using JXC.Application.Dtos;
using JXC.Core.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace JXC.WebAPI.Profiles
{
    public class ReturnedDetailProfile:Profile
    {
        public ReturnedDetailProfile()
        {
            CreateMap<ReturnedDetail, ReturnedDetailDto>();
            CreateMap<ReturnedDetailDto, ReturnedDetail>()
                .ForMember(opt => opt.UintPrice, dest => dest.MapFrom(src => src.unitPriceOfDeliveryPlan))
                .ForMember(opt => opt.CommodityInformationSheetId, dest => dest.MapFrom(src => src.Id));

        }
    }
}
